package com.fengye.dubbo.consumer.controller;

import com.fengye.dubbo.api.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DubboUserController {

	@DubboReference
	private UserService userService;

	@GetMapping("/dubbo/consumer/user")
	public String getUser()
	{
		return userService.getName();
	}
}
